<template>
	<view class=" u-m-t-30">
		<view class="container" v-for="(item,index) in agentPolicyCostInfo" :key="index">
			<view class="container__title u-border-bottom u-font-15 u-padding-20">
				{{item.activityName}}
			</view>
			<view class="flex list-item u-padding-20 u-m-t-30">
				<view class="flex-1">
					税点
				</view>
				<view class="">
					<text class="bg">{{item.taxPoint}}</text>%
				</view>
			</view>
			<view class="flex list-item u-padding-20 ">
				<view class="flex-1">
					首次激活返现
				</view>
				<view class="">
					<text class="bg">{{item.activeRecash}}</text>元
				</view>
			</view>
			<view class="flex list-item u-padding-20 ">
				<view class="flex-1">
					重复激活返现
				</view>
				<view class="">
					<text class="bg">{{item.repeatActiveRecash}}</text>元
				</view>
			</view>
			<view class="flex list-item u-padding-20 ">
				<view class="flex-1">
					达标返现1
				</view>
				<view class="">
					<text class="bg">{{item.standardRecash1}}</text>元
				</view>
			</view>
			<view class="flex list-item u-padding-20 ">
				<view class="flex-1">
					达标返现2
				</view>
				<view class="">
					<text class="bg">{{item.standardRecash2}}</text>元
				</view>
			</view>
			<view class="flex list-item u-padding-20 ">
				<view class="flex-1">
					达标返现3
				</view>
				<view class="">
					<text class="bg">{{item.standardRecash3}}</text>元
				</view>
			</view>
			<view class="flex list-item u-padding-20 ">
				<view class="flex-1">
					sim卡返现1
				</view>
				<view class="">
					<text class="bg">{{item.flowRecash}}</text>元
				</view>
			</view>
			<view class="flex list-item u-padding-20 ">
				<view class="flex-1">
					sim卡返现2
				</view>
				<view class="">
					<text class="bg">{{item.flowRecash2}}</text>元
				</view>
			</view>
		</view>
		<u-button class="u-m-t-50 u-margin-20" type="primary" :custom-style="customStyle" v-if="flag=='1'"
			@click="changeConfigure()">修改配置</u-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				customStyle: {
					// 注意驼峰命名，并且值必须用引号包括，因为这是对象
					backgroundColor: '#FF8625'
				},
				agentPolicyCostInfo: [],
				flag: null,
				agentNo: ""
			}
		},
		onLoad(options) {
			this.agentPolicyCostInfo = JSON.parse(decodeURIComponent(options.agentPolicyCostInfo));

			this.flag = options.flag;
			this.agentNo = options.agentNo;
			// console.log("activityName=" + JSON.stringify(this.agentPolicyCostInfo));
			// console.log("flag=" + this.flag);
		},
		methods: {
			changeConfigure() {
				this.$u.route({
					url: 'packageA/pages/main/agent/agentChangeReappearanceAllocationMoney',
					params: {
						"agentPolicyCostInfo": this.$route.query.agentPolicyCostInfo,
						agentNo: this.agentNo

					}
				})
			}
		},
	}
</script>

<style scoped lang="scss">
	.container {
		background-color: white;

		&__title {
			font-weight: bold;
		}
	}

	.bg {
		background-color: #f6f6f6;
		padding: 10rpx 20rpx;
		border-radius: 10rpx;
	}

	.list-item {
		// height: 80rpx;
		// line-height: 80rpx;
	}
</style>